package repository;

        import dbConnect.dbConnecter;

        import java.sql.SQLException;

public class DeleteUserRepository {
    public DeleteUserRepository(){

    }
    public boolean ChangeAdmin(String account)  throws SQLException {
        dbConnecter conUser = new dbConnecter();
        conUser.getConnection();
        String sql = "Delete From User_tb Where userAccount="+ dbConnecter.toSql(account);
        try {
            int result = conUser.resultSql(sql);
            if ( result> 0) {
                return true;
            }
            else
            {return false;}
        }catch (Exception e) {
            e.printStackTrace();
            return false;
        } finally {
            conUser.close();
        }
    }
}
